package com.example.singleton.demo.singleton;

import lombok.extern.slf4j.Slf4j;

/**
 * 立即加载/饿汉模式
 */
@Slf4j
public class StarvingModelSingleton {

    private static StarvingModelSingleton instance = new StarvingModelSingleton();

    private StarvingModelSingleton() {
    }

    public static StarvingModelSingleton getInstance() {
        return instance;
    }


    public void doSomeThing() {
        log.info(">>> StarvingModelSingleton do some things");
    }

}
